package ebuy.com.cotroller;

import ebuy.com.pojo.Easybuy_news;
import ebuy.com.server.Easybuy_newsserer;
import ebuy.com.util.RespBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class Easybuy_newssererCotroller {
    @Autowired
    private Easybuy_newsserer easybuy_newsserer;
    @GetMapping("/newr")
    public RespBean GetNew(){
        List<Easybuy_news> checknews = easybuy_newsserer.Checknews();
        return RespBean.success("查询成功",checknews);

    }
}
